'''
Created on 18 dec. 2011

@author: Daan
'''

import time

class Tick(object):
    '''
    classdocs
    '''


    def __init__(self):
        '''
        Constructor
        '''
        self._oldtime = 0
        self._newtime = time.time()
        self._passedtime = 0
    
    def Update(self):
        self._oldtime = self._newtime
        self._newtime = time.time()
        self._passedtime= self._newtime - self._oldtime
    
    def GetPassedTime(self):
        return self._passedtime